package org.feng.feign;

import org.feng.base.entity.Result;
import org.feng.entity.Menu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 冯帅
 * @des TODO
 * @date 2022/2/7 9:07
 * @email 15612509687@163.com
 */
@FeignClient(value = "system", fallback = MenuFallBackHandler.class,contextId="menu")
public interface MenuFeign {

    //根据角色id获取按钮权限
    String GET_BUTTONS = "get_buttons";

    @GetMapping(GET_BUTTONS)
    Result<List<Menu>> getButtons(@RequestParam("roleId") Long roleId);
}
